﻿// JScript 文件
function message(msgstr,type){
    var msg = $("#window_message_div");
                  if(msg.size()==0){
                        $("body").append("<div id='window_message_div' class='window_message' style='display:none'></div>");
                        msg = $("#window_message_div");
                  }else{
                    if(msg.css('display')=="block")
                         return;
                  }
                  type = type==null?0:type; //0 正确 1 警告
                  if(type==0)
                    msg.get(0).className="window_message window_message_success";
                  else
                    msg.get(0).className="window_message window_message_warning"; 
                    
                  msg.html(msgstr).css({
                        'top' : ($(window).height()-msg.height())/3+$(document).scrollTop(),
		                'left' :($(window).width()-msg.width())/2+$(document).scrollLeft()
		               
                  }).show();
                  setTimeout('$("#window_message_div").hide("drop",{},800,function(){$("#window_message_div").removeAttr("style").hide()}); ',2000);
}